<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<style>
		html,body{
			width: 100%;
			height: 100%;
			overflow: hidden;
		}
		#box{
			width:50px; height: 50px; background: blue;
			position: absolute; left: 100px; top: 150px;
			border-radius: 50%;
		}
	</style>
	<script src="js/draggable.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		
		//缓冲运动
		onload = function(){
			var box = document.getElementById("box");
			var speedx = 50;
			var timer = setInterval(function(){
				speedx = (800-box.offsetLeft-box.offsetWidth)/8;
				speedx = speedx < 1 ? 1 : speedx
				box.style.left = box.offsetLeft + speedx + "px";
				if(box.offsetLeft == (800-box.offsetWidth)){
					clearInterval(timer);
				}
			},30)
		}
	</script>
	<body>
		<div id="box">
			
		</div>
		<div id="wall" style="width: 1px; height: 100%; position: absolute; left:800px; top: 0; background: black;">
			
		</div>
	</body>
</html>
